<?php

class DbSlideshow extends DbModel{
	public $table_name = "slideshow";

	public $order = "`order` ASC";

	public function load(){
		$res = $this->find();
		$slideshow = array(
			"left" => array(),
			"right" => array()
		);
		foreach($res as $slide){
			$slideshow[$slide["position"]][] = $slide;
		}
		return $slideshow;
	}
}